package cn.wolfcode.trip.api.controller;

import cn.wolfcode.trip.base.domain.SystemCall;
import cn.wolfcode.trip.base.service.ISystemCallService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 游记资源控制器
 */
@RestController
@RequestMapping("systemcalls")
public class SystemCallController {

    @Autowired
    private ISystemCallService systemCallService;

    /**
     * 添加游记的接口
     * 1.资源 /systemCalls
     * 2.请求方式 get
     * 3.请求参数 分页
     * 4.返回结果 JsonResult
     */
    @GetMapping("{userId}")
    public List<SystemCall> list(@PathVariable Long userId){

        return systemCallService.selectAll(userId);
    }


}
